import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);

const store = new Vuex.Store({
    state: {
		// base_ip:'http://192.168.1.108:8000',
		base_ip:'http://192.168.43.127:8000/',
		userdata:{},
		logined:false,
		version:1.0
    },
	mutations:{
		get_userdata(state,playload){
			state.userdata = playload
			state.logined = true
		},
		delete_userdata(state){
			state.userdata = {contents:[]}
			state.logined = false
			state.logofilepath = '/static/head_portrait.jpg'
		},
		get_headportrait(state,playload){
			console.log('头像路径改变')
			state.logofilepath = playload.data
		}
	}
});
export default store;
